<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a="http://richfaces.org/a4j"
    template="layout/template.xhtml">

	<ui:define name="body">
	
		<table align="right">
			<tr>
				<td>
					<h:commandButton immediate="true"
						onclick="abrirPopup('help_online/help_tipo_vale.seam');" 
						title="Ajuda Online"
						alt="Ajuda Online"
						image="img/help_peq.jpg"/>
				</td>
			</tr>
		</table>

		<h2 class="title"><a href="#">Gerenciar Tipos de Vales</a></h2><br/>
            
            <h:form id="tipoValeForm">
            
	           <h:panelGrid columns="1">
	            	<s:decorate template="/layout/edit.xhtml">
	            		<ui:define name="label">Descrição:</ui:define>
	            		<h:inputText value="#{manterTipoValeController.tipoValeEdicao.dscTipoVale}" 
	            			maxlength="50"
	            			onkeydown="Mascara(this,Maiusculo)"
							onkeyup="Mascara(this,Maiusculo)"
	            			style="width: 200px"
	            			required="true"/>
	            	</s:decorate>
	            	
	            	<s:decorate template="/layout/edit.xhtml">
	            		<ui:define name="label">Obrigatório informar funcionário?</ui:define>
	            		<h:selectBooleanCheckbox value="#{manterTipoValeController.funcionarioObrigatorio}"/>
	            	</s:decorate>
	            </h:panelGrid>
	            <br/>
	            <div class="actionButtons">
		        	<h:commandButton id="submit" value="Salvar" action="#{manterTipoValeController.salvar}"
		            	onclick="javascript:if(!confirm('Tem certeza que deseja salvar?'))return false;"/>
		            	
		            <a:commandButton id="cancel" value="Cancelar" 
				        		action="#{manterTipoValeController.cancelar}" 
				        		ajaxSingle="true"
				        		reRender="tipoValeForm"/>
		        </div>
				<br/>
				
			</h:form>
			
 </ui:define>
</ui:composition>
